<form class="layui-form layui-box" action="__SELF__" data-auto="true" method="post" data-confirm="确定要取消编辑吗？">

    <div class="layui-form-item">
        <label class="layui-form-label">用户账号</label>
        <div class="layui-input-block">
            <if $info and $info.username>
            <input type="text" readonly="" disabled="" name="username" value='{$info.username|default=""}' required="required" title="请输入用户名称" placeholder="请输入用户名称" class="layui-input disabled">
           <else/>
            <input type="text" name="username" value='{$info.username|default=""}' required="required" title="请输入用户名称" placeholder="请输入用户名称" class="layui-input">
            </if>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">访问授权</label>
        <div class="layui-input-block">
            <foreach name="authorizes" item="authorize">
            <if in_array($authorize['id'],$info['authorize'])>
            <input type="checkbox" checked name="authorize[]" value="{$authorize.id}" title="{$authorize.title}">
            <else/>
            <input type="checkbox" name="authorize[]" value="{$authorize.id}" title="{$authorize.title}">
            </if>
            </foreach>
        </div>
    </div>

    <if isset($info['id'])><input type='hidden' value='{$info.id}' name='id'/></if>

</form>
